using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework;
using XNALibrary.Game;

namespace XNALibrary.PostProcessing
{
    public class DofCombineFilter : BaseFilter
    {
        private int textureBlur;
    
        //Constructor
        public DofCombineFilter(int textureBase, int textureBlur)
            : base(textureBase)
        {
            this.textureBlur = textureBlur;
        }

        public override void Register()
        {
            Shader = BaseGame.content.Load<Effect>("Resources\\Effects\\PostProcessing\\DofCombine");
        }

        public override void Update()
        {
            BaseGame.device.Textures[0] = Owner.Filters[0].RenderTarget.GetTexture();
            BaseGame.device.Textures[1] = Owner.Filters[textureBlur - 1].RenderTarget.GetTexture();            
        }
    }
}
